package com.dhcc.bpm.modules.alarm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;

import java.util.Date;

/**
 * @ClassName Alarm
 * @Description 告警表实体类
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
@Data
@TableName("opc_alarm")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Alarm对象", description = "告警表")
public class Alarm extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 告警名称
	 */
	@ApiModelProperty(value = "告警名称")
	private String alarmName;
	/**
	 * 告警编号
	 */
	@ApiModelProperty(value = "告警编号")
	private String alarmCode;
	/**
	 * 告警内容
	 */
	@ApiModelProperty(value = "告警内容")
	private String alarmContent;
	/**
	 * 告警级别
	 */
	@ApiModelProperty(value = "告警级别")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private Integer alarmLevel;
	/**
	 * 告警时间
	 */
	@ApiModelProperty(value = "告警时间")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date alarmTime;
	/**
	 * 告警策略
	 */
	@ApiModelProperty(value = "告警策略")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private Long opcAlarmStrategyId;
	/**
	 * 告警类型
	 */
	@ApiModelProperty(value = "告警策略")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private Long alarmType;

	/**
	 * 通知方式
	 */
	@ApiModelProperty(value = "通知方式")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private String noticeMethod;
	/**
	 * 告警通知对象
	 */
	@ApiModelProperty(value = "告警通知对象")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private String noticeUser;
	/**
	 * 产品id
	 */
	@ApiModelProperty(value = "告警策略")
	@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
	private String opcProductId;
	/**
	 * 描述
	 */
	@ApiModelProperty(value = "描述")
		@TableField(value = "`describe`")
	private String describe;

	/**
	 * 刷新标志
	 * 2----未刷新   1----刷新
	 */
	@ApiModelProperty(value = "刷新标志")
	private Integer refreshFlag;
	/**
	 * 环境 1-测试 2-生产
	 */
	@ApiModelProperty(value = "环境")
	private String env;

}
